package main

import (
	"fmt"
	"math"
)

func main() {
	max := []int{0, 0, 0} //a,b,consecutive numbers
	for i := -999; i < 1000; i += 2 {
		for j := -999; j < 1000; j += 2 {
			n := consecutive(i, j)
			if n > max[2] {
				max[0], max[1], max[2] = i, j, n
			}
		}
	}
	fmt.Println(max[0], max[1], max[0]*max[1])
}

func consecutive(a, b int) int {
	i := 0
	for ; isPrime(i*i + a*i + b); i++ {
	}
	return i
}
func isPrime(n int) bool {
	if n < 2 {
		return false
	}
	for i := 2; i <= int(math.Sqrt(float64(n))); i++ {
		if n%i == 0 {
			return false
		}
	}
	return true
}
